# Contributor:
# Maintainer: Vladimir Vitkov <vvitkov@gmail.com>
pkgname=nuzzle
pkgver=1.5
pkgrel=0
# as there is no official versioning code comes from git hash
# use the hash later on for shortening of commands
_gitcommit="2fdb5e793cb3e41cd5ef350d757aef7eeba93bda"
pkgdesc="Lightweight, fast network attack detection IDS and IPS"
url="https://nuzzle.hackerfactor.com/"
arch="all"
license="custom"
makedepends="g++"
subpackages="$pkgname-doc"
options="toolchain !check"	# No test suite provided.
				# Single c file.
				# Author recommends using g++ for build
source="$pkgname-$pkgver.zip::https://github.com/hackerfactor/nuzzle/archive/$_gitcommit.zip"
prepare() {
	mkdir -p "$builddir"
	mv "$srcdir"/$pkgname-$_gitcommit/* "$builddir"/
	default_prepare
}

build() {
	g++ -Wall -o nuzzle nuzzle.c
}

package() {
	install -m755 -D "$builddir"/nuzzle "$pkgdir"/usr/sbin/nuzzle
	install -m644 -D "$builddir"/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
	install -m644 -D "$builddir"/README.md "$pkgdir"/usr/share/doc/$pkgname/README.md
}
sha512sums="
7e08bf666634acbd8a8304254073e6c64d880347440050409c70ea3ee5671274bdef16de8ab8b7fcf7c4e12b855cd2db5acddb6231fd4708d16eae2cd241cc58  nuzzle-1.5.zip
"
